﻿<UserControl 
    x:Class="DiscoveryLogic.Analytics.Modules.VisualSettings.VerticeVisualSetting"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Height="Auto" Width="Auto" 
    Loaded="UserControl_Loaded" Background="Transparent">
    <Grid Height="600">
        <Grid.RowDefinitions>
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="80"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="100"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        
        <Label 
            Grid.Row="0" Grid.Column="0"
            VerticalAlignment="Center" Margin="5,0,0,0">Entity type</Label>
        <ComboBox x:Name="cboEntityTypes"
            Grid.Row="0" Grid.Column="1"
            VerticalAlignment="Center" Margin="5,0,10,0" SelectionChanged="cboEntityTypes_SelectionChanged"></ComboBox>
        
        <Label
            Grid.Row="1" Grid.Column="0"
            VerticalAlignment="Center" Margin="5,0,0,0">Size</Label>
        <StackPanel 
            Grid.Row="1" Grid.Column="1" Orientation="Horizontal"
            Margin="5,0,10,0" VerticalAlignment="Center">
            <RadioButton
                Content="Fixed" Margin="0,0,10,0" x:Name="rdFixed"
                IsChecked="True" VerticalAlignment="Center" Click="rdFixed_Click"/>
            <Label
                x:Name="lblVerticeSize" Margin="5,0,5,0">20</Label>
            <Slider x:Name="sliderSize"
                Orientation="Horizontal"
                Minimum="5" Maximum="200" Value="20"
                TickFrequency="5" Height="16" Width="120" ValueChanged="Slider_ValueChanged"/>
        </StackPanel>
        
        <StackPanel 
            Grid.Row="2" Grid.Column="1"
            Margin="5,0,10,0"
            Orientation="Horizontal" VerticalAlignment="Center">
            <RadioButton x:Name="rdDynamic" Click="rdDynamic_Click"
                Content="Dynamic" Margin="0,0,10,0" 
                IsChecked="False" VerticalAlignment="Center"/>
            <ComboBox MinWidth="150" Margin="5,0,0,0" x:Name="cboSizeMeasure" SelectionChanged="cboSizeMeasure_SelectionChanged" />
        </StackPanel>
        
        <Label
            Grid.Row="3" Grid.Column="0"
            Margin="5,0,0,0" VerticalAlignment="Center">Shape</Label> 
        <ComboBox x:Name="cboShape"
            Grid.Row="3" Grid.Column="1"
            Margin="5,0,10,0" VerticalAlignment="Center" SelectionChanged="cboShape_SelectionChanged">
            <ComboBoxItem>Custom</ComboBoxItem>
            <ComboBoxItem>Circle</ComboBoxItem>
            <ComboBoxItem>Square</ComboBoxItem>
            <ComboBoxItem>Diamand</ComboBoxItem>
            <ComboBoxItem>Up trangle</ComboBoxItem>
            <ComboBoxItem>Dn Trangle</ComboBoxItem>
        </ComboBox>

        <Label
            Grid.Row="4" Grid.Column="0"
            Margin="5,0,0,0" VerticalAlignment="Center">Color</Label>
        <StackPanel 
            Grid.Row="4" Grid.Column="1" Orientation="Horizontal"
            Margin="5,0,10,0" VerticalAlignment="Center">
            <Canvas 
                x:Name="canvasVertice" 
                VerticalAlignment="Center"
                Background="Blue" Width="25" Height="25">
                <Image x:Name="icon" Visibility="Hidden"/>
            </Canvas>
            <Button x:Name="btnBrowseIcon" Content="..." Width="25" Margin="5,0,10,0" Height="25" Click="btnBrowseIcon_Click" />
        </StackPanel>
        
        <Label
            Grid.Row="5" Grid.Column="0"
            Margin="5,5,0,0" VerticalAlignment="Top">Flags</Label>
        
        <StackPanel Grid.Row="5" Grid.Column="1" Orientation="Vertical">
            <StackPanel Orientation="Horizontal"
                Margin="5,5,10,0" VerticalAlignment="Top">
                <ComboBox x:Name="cboFlagColors" Width="100" VerticalAlignment="Center" Padding="0,0,5,0"/>
                <Canvas x:Name="canvasFlagColor" Margin="5,0,0,0"
                    VerticalAlignment="Center" MouseUp="canvasFlagColor_MouseUp"
                    Background="Blue" Width="22" Height="22">
                </Canvas>
                <Button x:Name="btnAddFlagColor" Content="add flag" Margin="5,0,5,0" Width="60" Click="btnAddFlagColor_Click" />
                <Button Height="22" Name="btnClearAllFlags" Width="60" Click="btnClearAllFlags_Click">clear flags</Button>
            </StackPanel>
            <TextBlock x:Name="txtFlagColors" Text="" Margin="4" IsEnabled="False" TextWrapping="Wrap"/>
        </StackPanel>
        
        <Label
            Grid.Row="6" Grid.Column="0"
            Margin="5,0,0,0" VerticalAlignment="Center">Selected Color</Label>
        <StackPanel 
            Grid.Row="6" Grid.Column="1" Orientation="Horizontal"
            Margin="5,0,10,0" VerticalAlignment="Center">
            <Canvas 
                x:Name="canvasSelectedVertice" 
                VerticalAlignment="Center"
                Background="Red" Width="25" Height="25">
                <Image x:Name="selectedIcon" Visibility="Hidden"/>
            </Canvas>
            <Button 
                x:Name="btnBrowseSelectedIcon" Content="..." Width="25" 
                Margin="5,0,10,0" Height="25" Click="btnBrowseSelectedIcon_Click" />
            
        </StackPanel>
        
        <Label
            Grid.Row="7" Grid.Column="0"
            Margin="5,5,0,0" VerticalAlignment="Top">
            Vertice label:
        </Label> 
        <StackPanel
            Grid.Row="7" Grid.Column="1" Orientation="Vertical"
            Margin="5" HorizontalAlignment="Left" VerticalAlignment="Top">
            <RadioButton
                x:Name="rdNoLabel" IsChecked="True" 
                Margin="0,0,0,5" Click="rdNoLabel_Click">No label</RadioButton>
            <RadioButton
                x:Name="rdLabelAll" IsChecked="False" Margin="0,0,0,5"
                Click="rdLabelAll_Click" Content="Label all"/>
            <StackPanel Orientation="Horizontal" Margin="0,0,0,5">
                <RadioButton 
                    x:Name="rdLabelDegree" IsChecked="False" 
                    VerticalAlignment="Center" Click="rdLabelDegree_Click">
                    Show labels when degree above 0:
                </RadioButton>
                <Slider 
                    x:Name="sliderDegreeLabel" SmallChange="1" LargeChange="5" 
                    Minimum="0" Maximum="100" Value="0" Orientation="Horizontal"
                    Width="100" Height="25" Margin="10,0,10,0" ValueChanged="sliderDegreeLabel_ValueChanged" />
            </StackPanel>
            <StackPanel Orientation="Vertical" Margin="0,0,0,5">
                <RadioButton 
                    x:Name="rdLabelNames" IsChecked="False" 
                    Margin="0,0,0,5" Click="rdLabelNames_Click">
                    Label vertices with name:
                </RadioButton>
                <TextBox 
                    x:Name="txtLabelForNames" 
                    HorizontalAlignment="Stretch" 
                    Height="200" TextChanged="txtLabelForNames_TextChanged"
                    AcceptsReturn="True" TextWrapping="NoWrap"/>
            </StackPanel>
            
        </StackPanel>

        <Label Grid.Row="8" Grid.Column="0" Margin="0,0,0,5" VerticalAlignment="Center">Label color:</Label>
        <StackPanel Orientation="Horizontal" Margin="0,5,0,5" Grid.Row="8" Grid.Column="1">
            <Canvas 
                    x:Name="canvasLabelColor" Margin="5,0,5,0" Background="Green"
                    Width="20" Height="20" VerticalAlignment="Center" 
                    HorizontalAlignment="Center"/>
            <Button 
                    x:Name="btnVerticeLabelColor" Content="..." Width="20"
                    Height="20" VerticalAlignment="Center" Click="btnVerticeLabelColor_Click"/>
        </StackPanel>

        <StackPanel
            Grid.Row="9" Grid.ColumnSpan="2" HorizontalAlignment="Right"
            Margin="0,0,15,0" Orientation="Horizontal">
            <Button x:Name="btnCancel" Content="Cancel"  Width="55" Height="23"  Margin="5,0,5,0" Click="btnCancel_Click" />
            <Button x:Name="btnApply" Content="Apply"  Width="55" Height="23"  Margin="5,0,5,0" Click="btnApply_Click" />
        </StackPanel>
    </Grid>
        
</UserControl>
